﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CheckIdentityNumber
{
    class Program
    {
        /// <summary>
        /// CheckIdentityNumber(要求长度18，数字）
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            Console.Write("请输入您的身份证号码：");
            bool flag = false;
            string id = Console.ReadLine();
            if (id.Length == 18)
            {

                for (int i = 0; i < id.Length; i++)
                {
                    if (id[i] >= '0' && id[i] <= '9')
                    {
                        flag = true;
                    }
                }

            }
            if (flag == true)
            {
                Console.WriteLine("身份证号码输入正确");
            }
            else
            {
                Console.WriteLine("输入错误请重新输入");
            }



            Console.ReadKey();




        }
    }
}
